-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Allow the https server to request client certs only with OPTIONAL (IDFGH-16506) #17641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Allow the https server to request client certs only with OPTIONAL (IDFGH-16506) #17641
Conversation
👋 Hello 0xFEEDC0DE64, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
We have a configuration knob for this here: esp-idf/components/esp-tls/Kconfig Line 63 in 5c5eb99
Please see if that can help! Edit: Probably we should be using this config in the |
Hi thanks for sharing, but it does not help, since this completely breaks the security of my mqtt broker that verifies clients. I only want it optional for the https server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Maybe the new runtime config should be under ESP_TLS_SERVER_MIN_AUTH_MODE_OPTIONAL
to have a compile time switch available for this? So there will be compile time switch to enable the functionality and then runtime config to select which server it applies to
Do you think just offering this option all the time is a risk? If applications don't set it, behaviour should stay the same. That's why its set to true to reduce the cert checking. |
Hi @0xFEEDC0DE64 , My suggestion to have compile time switch is to enforce the configuration (as is the case currently). Along with the runtime check that you have enabled, we can cater to all different use cases. Having a compile time switch also helps to enforce a secure profile. Let me know your thoughts, we will be happy to include this PR. |
if (cfg->cacert_authmode_optional) | ||
mbedtls_ssl_conf_authmode(&tls->conf, MBEDTLS_SSL_VERIFY_OPTIONAL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"External opinion": I would suggest adding curly braces here, to stay consistent with the rest of the code. (Which also adds curly braces even for single statements, at least as far as I can see in the context).
Hi @0xFEEDC0DE64 , thanks for the PR. I will accept it and make any changes regarding the compile time switches internally if required. |
sha=6213a906c049d08f5bc1a372aad1577dee26fdf1 |
I want to serve my webinterface via https to smartphones and the manufacturer should have special permissions and we authenticate developers or production using client key / cert. The end customer will not have such a cert. The connection should not fail, but our internal APIs will then refuse to work.